package com.oscarmovie.service;

import java.util.List;

import com.oscarmovie.dao.CommentDao;
import com.oscarmovie.model.Comment;
import com.oscarmovie.model.Paging;

public class CommentServiceImpl implements CommentService{
	private CommentDao commentDao;

	public void setCommentDao(CommentDao commentDao) {
		this.commentDao = commentDao;
	}

	public CommentDao getCommentDao() {
		return commentDao;
	}
	
	public void save(Comment comment) {
		commentDao.save(comment);
	}

	
	public Comment load(int id) {
		Comment comment =  commentDao.load(id);
		return comment;
	}

	
	public List<Comment> list() {
		return commentDao.list();
	}

	

	public List<Comment> listByAccountId(int accountId) {
		return commentDao.listByAccountId(accountId);	
	}

	public List<Comment> listByMovieId(int movieId, Paging paging) {
		return commentDao.listByMovieId(movieId, paging);
	}

	public List<Comment> listByPersonId(int personId, Paging paging) {
		return commentDao.listByPersonId(personId, paging);
	}
}
